home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / lib / imake / Library.tmpl < prev    next >
Encoding:
Text File  |  1992-08-20  |  3.1 KB  |  112 lines

  1. /*
  2.  * Library imakefile info  - this contains any special redefinitions, etc.
  3.  * that Imakefiles in the various library subtrees will need.
  4.  *
  5.  * Before including this, you must set the following boolean variables:
  6.  * DoNormalLib, DoSharedLib, DoDebugLib, DoProfileLib
  7.  */
  8.  
  9. XCOMM $XConsortium: Library.tmpl,v 1.11 91/07/27 13:10:13 rws Exp $
  10.  
  11. #ifndef LibraryCcCmd
  12. #if DoSharedLib && defined(SharedLibraryCcCmd)
  13. #define LibraryCcCmd SharedLibraryCcCmd
  14. #else
  15. #define LibraryCcCmd CcCmd
  16. #endif
  17. #endif
  18. #ifndef LibraryCCOptions
  19. #if DoSharedLib && defined(SharedLibraryCCOptions)
  20. #define LibraryCCOptions SharedLibraryCCOptions
  21. #else
  22. #define LibraryCCOptions DefaultCCOptions
  23. #endif
  24. #endif
  25. #ifndef LibraryDefines
  26. #define LibraryDefines StandardDefines
  27. #endif
  28. #ifndef LibraryCDebugFlags
  29. #ifdef sprite
  30. #define LibraryCDebugFlags OptimizedCDebugFlags DebuggableCDebugFlags
  31. #else
  32. #define LibraryCDebugFlags OptimizedCDebugFlags
  33. #endif
  34. #endif
  35. #ifndef AvoidNullMakeCommand
  36. #define AvoidNullMakeCommand NO
  37. #endif
  38. #if AvoidNullMakeCommand
  39. _NULLCMD_ = @ echo -n
  40. #endif
  41.  
  42.          CC = LibraryCcCmd
  43.   CCOPTIONS = LibraryCCOptions
  44. STD_DEFINES = LibraryDefines
  45. CDEBUGFLAGS = LibraryCDebugFlags
  46.  
  47. #if DoDebugLib
  48. #define _DebuggedLibMkdir() LibMkdir(debugger)
  49. #define _DebuggedObjCompile(options) DebuggedLibObjCompile(options)
  50. #define _DebuggedCleanDir() LibCleanDir(debugger)
  51. #else
  52. #define _DebuggedLibMkdir() $(_NULLCMD_)
  53. #define _DebuggedObjCompile(options) $(_NULLCMD_)
  54. #define _DebuggedCleanDir() $(_NULLCMD_)
  55. #endif
  56.  
  57. #if DoProfileLib
  58. #define _ProfiledLibMkdir() LibMkdir(profiled)
  59. #define _ProfiledObjCompile(options) ProfiledLibObjCompile(options)
  60. #define _ProfiledCleanDir() LibCleanDir(profiled)
  61. #else
  62. #define _ProfiledLibMkdir() $(_NULLCMD_)
  63. #define _ProfiledObjCompile(options) $(_NULLCMD_)
  64. #define _ProfiledCleanDir() $(_NULLCMD_)
  65. #endif
  66.  
  67. #if DoSharedLib && DoNormalLib
  68. #define _SharedLibMkdir() LibMkdir(shared)
  69. #define _SharedObjCompile(options) SharedLibObjCompile(options)
  70. #define _SharedCleanDir() LibCleanDir(shared)
  71. #else
  72. #define _SharedLibMkdir() $(_NULLCMD_)
  73. #define _SharedObjCompile(options) $(_NULLCMD_)
  74. #define _SharedCleanDir() $(_NULLCMD_)
  75. #endif
  76.  
  77. #if DoSharedLib && !DoNormalLib
  78. #define _NormalObjCompile(options) NormalSharedLibObjCompile(options)
  79. #else
  80. #define _NormalObjCompile(options) NormalLibObjCompile(options)
  81. #endif
  82.  
  83. #ifndef LibraryObjectRule
  84. #define LibraryObjectRule()                        @@\
  85. all::                                    @@\
  86.     _DebuggedLibMkdir()                        @@\
  87.     _ProfiledLibMkdir()                        @@\
  88.     _SharedLibMkdir()                        @@\
  89.                                     @@\
  90. .c.o:                                    @@\
  91.     _DebuggedObjCompile($(_NOOP_))                    @@\
  92.     _ProfiledObjCompile($(_NOOP_))                    @@\
  93.     _SharedObjCompile($(_NOOP_))                    @@\
  94.     _NormalObjCompile($(_NOOP_))                    @@\
  95.                                     @@\
  96. clean::                                    @@\
  97.     _DebuggedCleanDir()                        @@\
  98.     _ProfiledCleanDir()                        @@\
  99.     _SharedCleanDir()                        @@\
  100.  
  101. #endif /* LibraryObjectRule */
  102.  
  103. #ifndef SpecialLibObjectRule
  104. #define SpecialLibObjectRule(objs,depends,options)            @@\
  105. objs: depends                                @@\
  106.     _DebuggedObjCompile(options)                    @@\
  107.     _ProfiledObjCompile(options)                    @@\
  108.     _SharedObjCompile(options)                    @@\
  109.     _NormalObjCompile(options)                    @@\
  110.  
  111. #endif /* SpecialLibObjectRule */
  112.